/*
 * Filename:    EvaluationJobDao.java
 * Copyright:   2015 中国平安保险（集团）股份有限公司 版权所有
 * Company:     平安科技养老险及健康险系统开发部
 * Create at:   2015-2-9
 */
package com.paic.mhis.hcpms.evaluation.common.dao;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;

import com.paic.mhis.hcpms.agreement.healthcareprovider.dto.HospitalProviderOrgDTO;
import com.paic.mhis.hcpms.evaluation.common.dto.EvalRuleJobDTO;
import com.paic.mhis.hcpms.evaluation.common.dto.ExemptionUnitDTO;
import com.paic.mhis.hcpms.evaluation.common.dto.IntgrityEvalChildDTO;
import com.paic.mhis.hcpms.evaluation.common.dto.IntgrityEvalDTO;
import com.paic.pafa.biz.dao.BaseDAO;

/**
 * @author EX-PANAN001
 * 
 */
@Component("evaluationJobDao")
public class EvaluationJobDao extends BaseDAO {
	/**
	 * 获取所有医疗机构
	 * 
	 * @return
	 */
	public List<HospitalProviderOrgDTO> getProviderInfo() {

		return (List<HospitalProviderOrgDTO>) this._list("evaluJob.queryProvider", null);
	}

	/**
	 * 新增诚信考评信息
	 * 
	 * @param iEvals
	 */
	public void addIntgrityEval(IntgrityEvalDTO IntgrityEval) {
		this._insert("evaluJob.addIntgrityEval", IntgrityEval);

	}

	/**
	 * 根据考评年度查询规则和考评总分
	 * 
	 * @param date
	 * @return
	 */
	public List<EvalRuleJobDTO> queryEvalRule(String date) {
		return (List<EvalRuleJobDTO>) this._list("evaluJob.queryEvalRule", date);

	}

	/**
	 * 新增诚信考评子表信息
	 * 
	 * @param iEvalChilds
	 */
	public void addIntgrityEvalChild(IntgrityEvalChildDTO IntgrityEvalChild) {
		this._insert("evaluJob.addIntgrityEvalChild", IntgrityEvalChild);
	}

	/**
	 * 根据机构编号和考评年度查询考评信息
	 * 
	 * @return
	 */
	public List<IntgrityEvalDTO> queryIntgrityEval(Map<String, Object> map) {
		return (List<IntgrityEvalDTO>) this._list("evaluJob.queryIntgrityEval", map);

	}

	/**
	 * 根据机构编号和考评年度修改考评信息
	 */
	public void updateIntgrityEval(Map<String, Object> map) {
		this._update("evaluation.updateIntgrityEval", map);
	}

	/**
	 * 根据考评编号　更新考评子表信息
	 * 
	 * @param evaluationCode
	 */
	public void updateIntgrityEvalChild(Map<String, Object> map) {
		this._update("evaluation.updateIntgrityEvalChild", map);
	}

	/**
	 * 根据考评编号删除子表对应信息
	 * 
	 * @param evaluationCode
	 */
	public void deleteIntgrityEvalChild(String evaluationCode) {
		this._delete("evaluJob.deleteIntgrityEvalChild", evaluationCode);
	}

	/**
	 * 新增免考信息
	 * 
	 * @param unitDTO
	 */
	public void addExemptionUnit(ExemptionUnitDTO unitDTO) {
		this._insert("evaluJob.addExemptionUnit", unitDTO);
	}

	/**
	 * 查询免考单位
	 * 
	 * @param map
	 * @returnmap
	 */
	public int queryExemptionUnit(Map<String, Object> map) {
		return this._getInt("evaluJob.queryExemptionUnit", map);
	}

	/**
	 * 获取诚信考评JOB时间
	 * 
	 * @param type
	 * @return
	 */
	public String queryJobTime(String type) {
		return this._getString("evaluJob.queryJobTime", type);
	}

}
